C ðàçìåùåíî íà http://tms.ystu.ru
CHARACTER*20 NAME
Call Grinit
Call MMS
Call SetMod(1,3)
Call SetBgr(7)
WRITE(*,3)
3 FORMAT(//,1X,'ÈÌß ÔÀÉËÀ ÄËß ×ÒÅÍÈß:'\)
READ(*,'(A20)') NAME
OPEN(1,FILE=NAME,STATUS='OLD')
READ(1,4) X0,Y0
4 FORMAT(4X,F6.2,8X,F6.2)
CLOSE(1)
Call Page(210.,297.,'Èâàíîâ',6,1)
C ÑÒÐÎÈÌ ÎÑÈ ÊÎÎÐÄÈÍÀÒ:
Call SetPen(6)
Call
Narrow(X0,Y0,X0,Y0+80.,5.,2)
Call
symbol(X0-7.,Y0+77.,5.,'Y',1,0.)
Call
Narrow(X0,Y0,X0+80.,Y0,5.,2)
Call
symbol(X0+80.,Y0-7.,5.,'X',1,0.)
C ÑÒÐÎÈÌ ÊÎÍÒÓÐ ÄÅÒÀËÈ:
Call SetPen(1)
Call MovE(X0+5.,Y0,0)
Call MovB(0.,20.,1)
Call
ARCIB(-40.,X0+45.,Y0+60.,0)
Call MovB(30.,0.,1)
Call MovB(-20.,-20.,1)
Call
ARCIB(30.,X0+25.,Y0+10.,0)
Call MovB(-20.,-10.,1)
C ÏÐÎÑÒÀÂÈÌ ËÈÍÅÉÍÛÅ ÐÀÇÌÅÐÛ
C ÈÑÏÎËÜÇÓß ÏÎÄÏÐÎÃÐÀÌÌÓ ÎÒÐÈÑÎÂÊÈ ËÈÍÅÉÍÎÃÎ ÐÀÇÌÅÐÀ
Call SetPen(5)
C R - ÐÀÑÒÎßÍÈÅ ÄÎ ÐÀÇÌÅÐÍÎÉ ËÈÍÈÈ
C S - ÄËÈÍÀ ÐÀÇÌÅÐÍÎÉ ËÈÍÈÈ
R=50.
S=30.
C ÎÏÈÑÀÍÈÅ ÒÎ×ÊÈ ÂÑÒÀÂÊÈ ÐÀÇÌÅÐÀ (XS,YS)
XS=X0+45.
YS=Y0+20.
C ÏÐÈÐÀÙÅÍÈÅ ÂÒÎÐÎÉ ÂÛÍÎÑÍÎÉ ËÈÍÈÈ ÐÀÇÌÅÐÀ (XS+S,YS+YS2)
YS2=-40.
Call Transl(XS,YS)
Call RAZM(R,S,YS2)
Call Reset
Call symbol(XS+S/2.-3.,YS+R+1.,5.,'30',2,0.)
R=10.
S=10.
XS=X0+5.
YS=Y0+10.
YS2=40.
Call Rotate(0,0,90.)
Call Transl(XS,YS)
Call RAZM(R,S,YS2)
Call Reset
Call
symbol(XS-R-1.,YS+S/2.-3.,5.,'10',2,90.)
R=10.
S=10.
XS=X0+5.
YS=Y0+0.
YS2=50.
Call Rotate(0,0,90.)
Call Transl(XS,YS)
Call RAZM(R,S,YS2)
Call Reset
Call
symbol(XS-R-1.,YS+S/2.-3.,5.,'10',2,90.)
R=30.
S=10.
XS=X0+45.
YS=Y0+20.
YS2=10.
Call Transl(XS,YS)
Call RAZM(R,S,YS2)
Call Reset
Call
symbol(XS+S/2.-3.,YS+R+1.,5.,'10',2,0.)
C ÏÐÎÑÒÀÂÈÌ ËÈÍÅÉÍÛÉ ÐÀÇÌÅÐ
C ÈÑÏÎËÜÇÓß ÏÎÄÏÐÎÃÐÀÌÌÓ ÎÒÐÈÑÎÂÊÈ ËÈÍÅÉÍÎÃÎ ÐÀÇÌÅÐÀ
C Ñ ÍÀÐÓÆÍÛÌÈ ÑÒÐÅËÊÀÌÈ
R=50.
S=5.
XS=X0+0.
YS=Y0+0.
YS2=0.
Call Transl(XS,YS)
Call RAZMNAR(R,S,YS2)
Call Reset
Call
symbol(XS-10,YS+R+1.,5.,'5',1,0.)
Call Reset
C ÏÐÎÑÒÀÂÈÌ ÐÀÄÈÓÑÛ
XS=X0+45.
YS=Y0+20.
Call
Narrow(XS,YS,XS-0.707*40.,YS+0.707*40.,5.,2)
Call
symbol(XS-0.707*30.+1.,YS+0.707*30.+1.,5.,'R40',3,-45.)
XS=X0+55.
YS=Y0+10.
Call
Narrow(XS,YS,XS-0.26*30.,YS+0.97*30.,5.,2)
Call
symbol(XS-0.26*15.+1.,YS+0.97*15.+1.,5.,'R30',3,-70.)
Call SetPen(1)
Call symbol(X0,Y0+90.,10.,'Èâàíîâ Ä.Ï. ÌÒ-57',17,0.)
Call Reset
Call EndPg('Èâàíîâ')
End
C ÏÎÄÏÐÎÃÐÀÌÌÀ ÎÒÐÈÑÎÂÊÈ ËÈÍÅÉÍÎÃÎ ÐÀÇÌÅÐÀ
Subroutine RAZM(R,S,YS2)
X=0.
Y=0.
X2=X
Y2=Y+R+5.
X3=X
Y3=Y+R
Call MovE(X,Y,0)
Call MovE(X2,Y2,1)
Call MovE(X3,Y3,0)
Call MovA(4.,10.,1)
Call MovE(X3,Y3,0)
Call MovA(4.,350.,1)
Call MovE(X3,Y3,0)
Call MovE(X3+S,Y3,1)
Call MovA(4.,170.,1)
Call MovE(X3+S,Y3,0)
Call MovA(4.,190.,1)
Call MovE(X3+S,Y-YS2,0)
Call MovE(X3+S,Y2,1)
Return
End
C ÏÎÄÏÐÎÃÐÀÌÌÀ ÎÒÐÈÑÎÂÊÈ ËÈÍÅÉÍÎÃÎ ÐÀÇÌÅÐÀ Ñ ÍÀÐÓÆÍÛÌÈ ÑÒÐÅËÊÀÌÈ
Subroutine RAZMNAR(R,S,YS2)
X=0.
Y=0.
X2=X
Y2=Y+R+5.
X3=X
Y3=Y+R
Call MovE(X,Y,0)
Call MovE(X2,Y2,1)
Call MovE(X3,Y3,0)
Call MovA(4.,170.,1)
Call MovE(X3,Y3,0)
Call MovA(4.,190.,1)
Call MovE(X3-15.,Y3,0)
Call MovE(X3+S+7.,Y3,1)
Call MovE(X3+S,Y3,0)
Call MovA(4.,10.,1)
Call MovE(X3+S,Y3,0)
Call MovA(4.,350.,1)
Call MovE(X3+S,Y-YS2,0)
Call MovE(X3+S,Y2,1)
Return
End